#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	int n, m;
	int sum = 1;
	scanf("%d", &n);
	m = n;
	for (m; m > 0; m--)
	{
		sum = sum * m;//m m-1...  2 1
	}
	printf("%d", sum);
	return 0;
}